using ChikovMF.Application.Features.Projects.EditProject;
using Shouldly;

namespace ChikovMF.Tests.Projects.Queries;

public class EditProjectTest : TestQueryBase
{
    [Fact]
    public async Task EditProjectTest_Success()
    {
        var handler = new EditProjectQueryHandler(_context, _mapper);
        var command = new EditProjectQuery
        {
            ProjectId = new Guid("e6e7d3f0-b9b9-4f0b-a9b9-fe0b584bb9cd")
        };

        var result = await handler.Handle(
            command,
            CancellationToken.None
        );

        result.ShouldBeOfType<EditProjectModel>();
        result.Name.ShouldBe("project1");
    }
}